package com.container.app.testclasses.movies;

import com.container.app.annotations.Component;
import com.container.app.annotations.ImplementationTag;
import com.container.app.annotations.Inject;

import java.util.LinkedList;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: Georgiana.Scarlat
 * Date: 7/12/12
 * Time: 10:06 AM
 */
@Component(name = "chosen implementation")
public class MovieFinderAnotherImplementation implements MovieFinder {

    MovieFinder myFinder;

    @SuppressWarnings("UnusedDeclaration")
    @Inject
    public void setMyFinder(@ImplementationTag("simple implementation") MovieFinder myFinder) {
        this.myFinder = myFinder;
    }

    public List<String> find() {

        List<String> other = myFinder.find(), result = new LinkedList<String>();
        for (String s : other) {
            result.add(s + "!!!");
        }

        return result;
    }
}
